package route

import (
	"camera_app/api/controller"
	"camera_app/entity"
	"camera_app/middleware"
	service "camera_app/repository"

	"github.com/gin-gonic/gin"
	"gorm.io/gorm"
)

func NewPictureRoute(db *gorm.DB, group *gin.RouterGroup) {
	pr := &service.PictureRepository{
		Picture: &entity.Picture{},
		DB:      db,
	}
	pc := controller.NewPictureController(pr)
	group.POST("/pic/savePicture", middleware.HasAuth, pc.SavePictureToBucket)
	group.POST("/pic/sharePics", middleware.HasAuth, pc.SharePics)
	group.GET("/pic/getPics", middleware.HasAuth, pc.GetPics)

}
